-
Notifications
You must be signed in to change notification settings - Fork 8.1k
enable irqsteer for m33 of imx943 #93760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
enable irqsteer for m33 of imx943 #93760
Conversation
zephyr_library_sources_ifdef(CONFIG_RENESAS_RX_ICU intc_renesas_rx_icu.c) | ||
zephyr_library_sources_ifdef(CONFIG_RENESAS_RZ_EXT_IRQ intc_renesas_rz_ext_irq.c) | ||
zephyr_library_sources_ifdef(CONFIG_NXP_IRQSTEER intc_nxp_irqsteer.c) | ||
zephyr_library_sources_ifdef(CONFIG_NXP_IRQSTEER1 intc_nxp_irqsteer1.c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explain why do you need a new driver?
Why the intc_nxp_irqsteer.c
driver is not enough?
In the commit message you state that the "old" intc_nxp_irqsteer
driver can be replaced.
In this case, why don't you enhance the intc_nxp_irqsteer
driver with the support that you need for i.MX943?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a good question.
Because of the new structure of irqsteer(https://github.com/zephyrproject-rtos/hal_nxp/blob/master/mcux/mcux-sdk-ng/devices/i.MX/i.MX943/periph/PERI_IRQSTEER.h#L244) is different with the old structure of irqsteer(https://github.com/zephyrproject-rtos/hal_nxp/blob/master/mcux/mcux-sdk-ng/devices/i.MX/i.MX95/periph/PERI_IRQSTEER.h#L145),
The new driver doesn't depend on the structure IRQSTEER_TYPE. It can be used in all of platforms.(i.mx8, i.mx95, i.mx943. Include irqsteer instance dpu_irqsteer, m33_irqsteer, m7_irqsteer, a55_irqsteer, dsp_irqsteer, hdmi_irqsteer)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@biwenli so your proposal is to replace the "old" irqsteer driver with the new one?
Usually, when such a thing is happening you need to update all the references to the old driver with the new one. And as last point remove the old driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@biwenli so your proposal is to replace the "old" irqsteer driver with the new one?
Usually, when such a thing is happening you need to update all the references to the old driver with the new one. And as last point remove the old driver.
Yes, the old driver will be phased out over time. New product will use the new driver directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@biwenli Could you please add a note indicating that the old irqsteer
will be deprecated and should no longer be used in new samples or products?
Also, it would be helpful to include at least one commit where the old irqsteer
is replaced with the new implementation, so others can refer to it as an example.
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@biwenli Could you please add a note indicating that the old
irqsteer
will be deprecated and should no longer be used in new samples or products? Also, it would be helpful to include at least one commit where the oldirqsteer
is replaced with the new implementation, so others can refer to it as an example. Thanks.
Sure, np. Thanks.
2112635
to
1f02269
Compare
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
@biwenli you will also need to convert at least 1 user of the old driver to test your new implemenation. Ideally would be to convert all users, but we can do it in phases as we don't want to slow you down. |
280c91f
to
f0e2e5c
Compare
@dbaluta @iuliana-prodan can you reengage on this PR now that it is clear CI |
f0e2e5c
to
23f8870
Compare
tests/arch/arm/arm_irq_advanced_features/src/arm_dynamic_direct_interrupts.c
Show resolved
Hide resolved
651c8e1
to
7e7f35c
Compare
There are two irqsteer driver in mcux sdk, Their apis are not compatible. So add new option CONFIG_INTC_MCUX_IRQSTEER_V1 to pick right irqsteer driver in mcux sdk for the zephyr irqsteer driver Signed-off-by: Biwen Li <[email protected]>
Add option INTC_MCUX_IRQSTEER_V1 to pick right nxp mcux sdk irqsteer driver (there are two irqsteer driver in mcux sdk). Signed-off-by: Biwen Li <[email protected]>
Add irqsteer node to support multi level interrupts Signed-off-by: Biwen Li <[email protected]>
Add new property nxp,version to pick right irqsteer driver in nxp mcux sdk (There are two irqsteer driver in nxp mcux sdk, and their apis are not compatible). Signed-off-by: Biwen Li <[email protected]>
Pick right irqsteer driver in nxp mcux sdk. Signed-off-by: Biwen Li <[email protected]>
This commit enables multi level interrupts: - enable multi level interrupts imx943 is a two level interrupts system - Increase irq number from 405 to 790 Actually there are 407(IRQ 0 ~ IRQ 406) interrupts from nvic(first level interrupts), The second level interrupts are extended by irqsteer, it extends 32 x 12 = 384 interrupts, So first level interrupts + second level interrupts = 407 + 384 = 791(IRQ 0 ~ IRQ 790) interrupts Signed-off-by: Biwen Li <[email protected]>
Enable edma4 by default for m33(in NETCMIX) of imx943_evk Signed-off-by: Biwen Li <[email protected]>
- Add priority attribute to support multi level interrupts Update interrupt-cells of irqsteer master - DT_INST_IRQ_BY_IDX(n, idx, priority) is used to get priority attribute of interrupt in some drivers, so add priority for irqsteer master to align priority attribute. dts: arm: nxp: imx95: m7: increase the number of interrupt-cells - Increase the number of interrupt-cells to support the new added priority attribute for irqsteer. Increase the number of interrupt-cells for imx95_m7 - Add priority attribute to fix build issue. dts: xtensa: nxp: unify irqsteer's interrupt attributes with general interrupt Unify irqsteer's interrupt attributes with general interrupt for imx8, imx8m, imx8qm, imx8qxp. - add priority attribute to fix build issue tests: drivers: intc: imx8mp_evk: adsp: unify irqsteer's interrupt attributes with general interrupt Unify irqsteer's interrupt attributes with general interrupt for imx8mp_evk_mimx8ml8_adsp - Add priority attribute to fix build issue. Signed-off-by: Biwen Li <[email protected]>
Correct irq number for multi level interrupts Signed-off-by: Biwen Li <[email protected]>
- Print SADDR, DADDR for debugging. Signed-off-by: Biwen Li <[email protected]>
Add config for imx943_evk_mimx94398_m33 - Use the sample to test the irqsteer driver Signed-off-by: Biwen Li <[email protected]>
This commit fixes build issue when multi level interrupts is enabled, define TEST_IRQ_NUM as (CONFIG_2ND_LVL_ISR_TBL_OFFSET - 1) - CMSIS/Core/Include/core_cm33.h:2438:15: error: array subscript 24 is above array bounds of volatile uint32_t[16] Signed-off-by: Biwen Li <[email protected]>
This commit fixes build issue when multi level interrupts feature is enabled, define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to support multi level interrupts case. - error: array subscript 24 is above array bounds of 'volatile uint32_t[16]' {aka 'volatile unsigned int[16]'} [-Werror=array-bounds]) Signed-off-by: Biwen Li <[email protected]>
Fix build issue when multi level interrupts is enabled, define new macro TEST_1ST_LEVEL_INTERRUPTS_MAX to support multi level interrupts case. - core_cm33.h:2559:47: error: iteration 496 invokes undefined behavior [-Werror=aggressive-loop-optimizations] Signed-off-by: Biwen Li <[email protected]>
Exclude imx943, - multi level interrupts feature is enabled defaultly, so irqsteer1 driver is enabled, then the test case report the build issue: multiple definition of z_soc_irq_enable, tests/arch/arm/arm_custom_interrupt/src/arm_custom_interrupt.c:47 first defined here. Signed-off-by: Biwen Li <[email protected]>
7e7f35c
to
fccc04c
Compare
|
enable irqsteer for imx943.